package com.dianwoba.core.spring;

import javax.servlet.ServletContextEvent;

import org.springframework.web.context.ContextLoaderListener;

/**
 * 重写Spring ContextLoaderListener初始化方法，取到context
 * @author licf
 */
public class DianwobaContextLoaderListener extends ContextLoaderListener {

	@Override
	public void contextInitialized(ServletContextEvent event) {
		super.contextInitialized(event);
		ContextHolder.setCtx(getCurrentWebApplicationContext());
	}

}
